#!/usr/bin/perl 

# Copyright Notice 

package yalw::yalw;
use warnings; use strict; use CGI; my $cgi=new CGI;
use lib qw(/usr/share/yalw/plugins/);# Add plugin dir to @INC

#...
sub new(){my ($class)=@_;my $self={};bless ($self,$class);}

# Call plugin and return its result
sub use_plugin(){my ($self, $plugin,%config)=@_; our %plugin_config=%config; delete $INC{"$plugin"}; return require ($plugin);}

# Print </body> </html> :-)
sub print_end(){return $cgi->end_html;}

# Return headers and html start with css
sub print_start(){
	my ($self, $url,$title, $style)=@_;
	return $cgi->header(-encoding=>'utf-8').
	$cgi->start_html(-title=>$title,-style=>{-src=>"http://$url/themes/$style"});
}


